package cn.gyyx.proto;


public enum ServerTypeEnum {
    /**
     * game进程
     */
    GAME(1),
    /**
     * 登录服务器
     */
    AUTH(2),
    /**
     * relation
     */
    RELATION(3),
    /**
     * gm
     */
    GM(4),
    /**
     * changeStream
     */
    CHANGE_STREAM(5),
    /**
     * 聊天服务器
     */
    CHAT(7),
    ;
    private final int type;

    ServerTypeEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }


    public static ServerTypeEnum getByValue(int value){
        for(ServerTypeEnum x:values()){
            if(x.getType()==value){
                return x;
            }
        }
        return null;
    }

}
